package com.wyhello.tube4.spring.model;

import java.util.List;

import com.wyhello.tube4.facade.TubeFacade;
import com.wyhello.tube4.pojo.Dictionary;
import com.wyhello.tube4.pojo.Draw;
import com.wyhello.tube4.pojo.Position;
import com.wyhello.tube4.pojo.Reside;
import com.wyhello.tube4.pojo.Tube;

public class ResideRecordsModel {
	private TubeFacade facade;
	public TubeFacade getFacade() {
		return facade;
	}

	public void setFacade(TubeFacade facade) {
		this.facade = facade;
	}
	/**
	 * 保存归属信息
	 * @param reside
	 * @return
	 */
	public boolean saveReside(Reside reside){
		return facade.saveReside(reside);
	}
	/**
	 * 查询所有的锅炉
	 * @return
	 */
	public List<Reside> queryResideByBoiler(){
		return facade.queryResideByBoiler();
	}
	/**
	 * 根据级别查询信息
	 * @param level查询信息
	 * @return
	 */
	public List<Reside> queryResideByLevel(int level){
		return facade.queryResideByLevel(level);
	}
	/**
	 * 根据Id查询所属表的信息
	 * @param id
	 * @return
	 */
	public Reside getResideById(int id){
		return facade.getResideById(id);
	}
	/**
	 * 对信息进行修改
	 * @param reside
	 * @return
	 */
	public boolean updateReside(Reside reside){
		return facade.updateReside(reside);
	}
	/**
	 * 删除归属表的信息
	 * @return
	 */
	public int deleteReside(String ids){
		return facade.deleteReside(ids);
	}
	public void deleteOj(Reside reside){
		facade.deleteOj(reside);
	}
	/**
	 * 保存管信息
	 * @param tube
	 */
	public void saveTube(Tube tube){
		facade.saveTube(tube);
	}
	/**
	 * 查询所有的管
	 * @return
	 */
	public List<Tube> queryTube(){
		return facade.queryTube();
	}
	/**
	 * 对管信息进行修改
	 * @param tube
	 * @return
	 */
	public boolean updateTube(Tube tube){
		return facade.updateTube(tube);
	}
	/**
	 * 管信息的删除
	 * @param ids
	 * @return
	 */
	public int deleteTube(String ids){
		return facade.deleteTube(ids);
	}
	public void deleteTOj(Tube tube){
		facade.deleteTOj(tube);
	}
	/**
	 * 根据id查询管
	 * @param id
	 * @return
	 */
	public Tube getTubeById(int id){
		return facade.getTubeById(id);
	}
	/**
	 * 位置信息的添加
	 * @param position
	 */
	public void savePosition(Position position){
		facade.savePosition(position);
	}
	/**
	 * 位置信息的查询
	 * @return
	 */
	public List<Position> queryPosition(){
		return facade.queryPosition();
	}
	/**
	 * 根据id查询位置信息
	 * @param id
	 * @return
	 */
	public Position getPositionById(int id){
		return facade.getPositionById(id);
	}
	/**
	 * 位置信息的删除
	 * @param ids
	 * @return
	 */
	public int deletePosition(String ids){
		return facade.deletePosition(ids);
	}
	public void deletePOj(Position position){
		facade.deletePOj(position);
	}
	public boolean updatePosition(Position position){
		return facade.updatePosition(position);
	}
	public int queryCountTubeByResideId(int resideId) {
		return facade.queryCountTubeByResideId(resideId);
	}
	public List<Dictionary> queryDictionaryByType(){
		return facade.queryDictionaryByType();
	}
	public List<Dictionary> queryDictionaryByWeld(){
		return facade.queryDictionaryByWeld();
	}
	public List<Dictionary> queryDictionaryByWire(){
		return facade.queryDictionaryByWire();
	}
	/**
	 * 保存图片信息
	 * @param draw
	 */
	public void saveDraw(Draw draw){
		facade.saveDraw(draw);
	}
	/**
	 * 删除图片信息
	 */
	public void deleteDraw(String ids){
		facade.deleteDraw(ids);
	}
	/**
	 * 根据查询图片
	 * @param id
	 * @return
	 */
	public Draw getDrawById(int id){
		return facade.getDrawById(id);
	}

	public List<Reside> queryResideByParendID(int id) {
		return facade.queryResidesByParendID(id);
	}
	
	
	public int queryCountOfChildrenByParentId(int parentId){
		return facade.queryCountOfChildrenByParentId(parentId);
	}
}
